//
//  YIYIYICollectionViewCell.m
//  Hand-held_kitchen
//
//  Created by 张张烨 on 16/1/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "YIYIYICollectionViewCell.h"

@implementation YIYIYICollectionViewCell

- (void)dealloc
{
    [_touxiang release];
    [_nicheng release];
    [_fensishu release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.touxiang = [[UIImageView alloc]init];
        _touxiang.layer.cornerRadius = 45* GAO;
        _touxiang.clipsToBounds = YES;
        [self.contentView addSubview:_touxiang];
        [_touxiang release];
        
        self.nicheng = [[UILabel alloc]init];
        _nicheng.font = [UIFont systemFontOfSize:13];
        _nicheng.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_nicheng];
        
        [_nicheng release];
        
        self.fensishu = [[UILabel alloc]init];
        [self.contentView addSubview:_fensishu];
        _fensishu.font = [UIFont systemFontOfSize:11];
        _fensishu.textAlignment = NSTextAlignmentCenter;
        [_fensishu release];
        
        
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _touxiang.frame = CGRectMake(0, 0, 90 * GAO, 90 * GAO);
    _nicheng.frame = CGRectMake(0, 91 * GAO, 90 * KUAN, 30 * GAO);
    
    _fensishu.frame = CGRectMake(0, 122 * GAO, 90 * KUAN, 20 * GAO);
}


@end
